(mac-service-open-file): Use file URL instead of file name string.
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Sun, 16 Mar 2008 09:15:38 +0000 (09:15 +0000)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Sun, 16 Mar 2008 09:15:38 +0000 (09:15 +0000)
lisp/term/mac-win.el

index 7bf738bdd50ed1c48c761b05d6c0500479887211..3ed2e5440a8887cfcb88fcb99a44f402236e7686 100644 (file)
@@ -2117,7 +2117,9 @@ either in the current buffer or in the echo area."
 (defun mac-service-open-file ()
   "Open the file specified by the selection value for Services."
   (interactive)
-  (find-file-existing (x-selection-value mac-service-selection)))
+  ;; The selection seems not to contain the file name as
+  ;; public.utf16-plain-text data on Mac OS X 10.4.
+  (dnd-open-file (x-get-selection mac-service-selection 'public.file-url) nil))
 
 (defun mac-service-open-selection ()
   "Create a new buffer containing the selection value for Services."